<include file="Public:js" /> 
<div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="#">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">分类列表</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="post">
                    <!-- <table class="search-tab">
                        <tr>
                           
                            
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table> -->
                </form>
            </div>
        </div>
        <div class="result-wrap">
           
                <div class="result-title">
                    <div class="result-list">
                        <a href="{:U('Terms/add')}"><i class="icon-font"></i>新增</a>
                       <!-- <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>-->
                        <a   href="javascript:history.back(-1);"><i class="icon-font"></i>返回</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="80%">
                        <tr>
                            <!--<th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>-->
                            <!--<th>排序</th>-->
                            <th>ID</th>
                            <th>分类名称</th>
                            <th>上级分类</th>
                              
                            <th width="20%">操作</th>
                        </tr>
                        <foreach name="data" item="val"> 
                        <tr>                           
                            <td>{$val.cat_id}</td>
                            <td title="{$val.supplier_name}"><a target="" href="{:U('Terms/listc',array('term_id'=>$val['term_id']))}" title="{$val.name}">{$val.level|str_repeat='&ensp;',###*2}展开{$val.cat_name}</a>
                            </td>   
                            <td>
                                
                                <if condition="$val.parent_id == 0 ">顶级分类    <else /> {$val.parentname}</if>
                            </td>
                           
                            <td>
                                <a class="link-update" href="{:U('Terms/editTrems',array('term_id'=>$val['term_id']))}">修改</a>
                                <!-- <a class="link-del" href="{:U('Terms/delTrems',array('term_id'=>$val['term_id']))}">删除</a> -->
                                 
                                <if condition="$val.parent_id neq 0 ">
                                <a class="link-del" href="{:U('Terms/fieldList',array('term_id'=>$val['term_id']))}">编辑信息</a>
                               </if>
                            </td>
                            
                        </tr>
                        </foreach> 
                        
                    </table>
                    <div class="list-page">{$page}</div>
                </div>
          
        </div>
    </div>
  